/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('mssp', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model ConfirmDjbhReportRequest {
  id?: long(name='Id', description='Primary key ID of the report.', example='24563'),
}

model ConfirmDjbhReportResponseBody = {
  code?: string(name='Code', description='API response code.', example='OK'),
  httpStatusCode?: string(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Return message.', example='Successful!'),
  requestId?: string(name='RequestId', description='Request ID.', example='EF801DD1-D934-51B3-92D4-776CE17B184F'),
  success?: string(name='Success', description='Whether the call was successful. - **true**: The call was successful. - **false**: The call failed.', example='true'),
}

model ConfirmDjbhReportResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ConfirmDjbhReportResponseBody(name='body'),
}

/**
 * @summary Confirm Receipt of Security Assessment Report
 *
 * @param request ConfirmDjbhReportRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ConfirmDjbhReportResponse
 */
async function confirmDjbhReportWithOptions(request: ConfirmDjbhReportRequest, runtime: Util.RuntimeOptions): ConfirmDjbhReportResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ConfirmDjbhReport',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Confirm Receipt of Security Assessment Report
 *
 * @param request ConfirmDjbhReportRequest
 * @return ConfirmDjbhReportResponse
 */
async function confirmDjbhReport(request: ConfirmDjbhReportRequest): ConfirmDjbhReportResponse {
  var runtime = new Util.RuntimeOptions{};
  return confirmDjbhReportWithOptions(request, runtime);
}

model CreateServiceLinkedRoleRequest {
  lang?: string(name='Lang', description='Language.', example='zh'),
  regionId?: string(name='RegionId', description='Region ID.', example='cn-hangzhou'),
}

model CreateServiceLinkedRoleResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='592B80F0-7674-56A4-9027-8A0A9ACDBD56'),
}

model CreateServiceLinkedRoleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateServiceLinkedRoleResponseBody(name='body'),
}

/**
 * @summary Create Service-Linked Role
 *
 * @param request CreateServiceLinkedRoleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateServiceLinkedRoleResponse
 */
async function createServiceLinkedRoleWithOptions(request: CreateServiceLinkedRoleRequest, runtime: Util.RuntimeOptions): CreateServiceLinkedRoleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateServiceLinkedRole',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Create Service-Linked Role
 *
 * @param request CreateServiceLinkedRoleRequest
 * @return CreateServiceLinkedRoleResponse
 */
async function createServiceLinkedRole(request: CreateServiceLinkedRoleRequest): CreateServiceLinkedRoleResponse {
  var runtime = new Util.RuntimeOptions{};
  return createServiceLinkedRoleWithOptions(request, runtime);
}

model CreateServiceWorkOrderRequest {
  creator?: string(name='Creator', description='Creator.

This parameter is required.', example='426556'),
  customerId?: string(name='CustomerId', description='Customer ID.

This parameter is required.', example='1477832102462645'),
  durationDay?: string(name='DurationDay', description='Duration in days.

This parameter is required.', example='5'),
  isAttachment?: string(name='IsAttachment', description='Attachment requirement.

This parameter is required.', example='Y'),
  isMilestone?: string(name='IsMilestone', description='Is milestone.', example='Y'),
  isWorkOrderNotify?: string(name='IsWorkOrderNotify', description='Whether a reminder is needed.

This parameter is required.', example='Y'),
  notifyDay?: string(name='NotifyDay', description='Number of days for advance notification.', example='5'),
  notifyId?: long(name='NotifyId', description='Notification ID.', example='10'),
  operateRemark?: string(name='OperateRemark', description='Operation remarks.

This parameter is required.', example='newly built'),
  operateType?: string(name='OperateType', description='Operation type.

This parameter is required.', example='CREATE'),
  operator?: string(name='Operator', description='Operator.

This parameter is required.', example='426556'),
  ownerId?: string(name='OwnerId', description='This parameter is required.'),
  startTime?: long(name='StartTime', description='Start time.

This parameter is required.', example='1734788109000'),
  workOrderDetail?: string(name='WorkOrderDetail', description='Work order details.

This parameter is required.', example='{"questionDetail":"测试工单","answerDetail":""}'),
  workOrderName?: string(name='WorkOrderName', description='Work order name.

This parameter is required.', example='Delivery task of safety monthly report'),
  workOrderSource?: string(name='WorkOrderSource', description='Work order source.

This parameter is required.', example='Work order migration'),
  workOrderStatus?: string(name='WorkOrderStatus', description='Work order status.

This parameter is required.', example='UNPROCESSED'),
  workOrderType?: string(name='WorkOrderType', description='Work order type.

This parameter is required.', example='MONTH_REPORT'),
}

model CreateServiceWorkOrderResponseBody = {
  code?: string(name='Code', description='Interface status code.', example='200'),
  data?: {
    completeTime?: long(name='CompleteTime', description='Completion time.', example='1734788109000'),
    createTime?: long(name='CreateTime', description='Creation time.', example='1734788109000'),
    creator?: string(name='Creator', description='Creator.', example='426556'),
    customerId?: string(name='CustomerId', description='Customer ID.', example='1477832102462645'),
    endTime?: long(name='EndTime', description='End time.', example='1734788109000'),
    id?: long(name='Id', description='Primary key.', example='1978941'),
    ownerId?: string(name='OwnerId', description='Owner.', example='426556'),
    startTime?: long(name='StartTime', description='Start time.', example='1734788109000'),
    workOrderDetail?: string(name='WorkOrderDetail', description='Work order details.', example='{"questionDetail":"测试工单","answerDetail":""}'),
    workOrderName?: string(name='WorkOrderName', description='Work order name.', example='Delivery task of safety monthly report'),
    workOrderSource?: string(name='WorkOrderSource', description='Work order source.', example='Work order migration'),
    workOrderStatus?: string(name='WorkOrderStatus', description='Work order status.', example='UNPROCESSED'),
    workOrderType?: string(name='WorkOrderType', description='Work order type.', example='MONTH_REPORT'),
  }(name='Data', description='Data returned by the interface.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt message of the returned result.', example='successful'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='7DC44321-7AAE-51CD-8E5F-CEB968569042'),
  success?: boolean(name='Success', description='Whether the call was successful.

- **true**: Call succeeded.

- **false**: Call failed.', example='true'),
}

model CreateServiceWorkOrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateServiceWorkOrderResponseBody(name='body'),
}

/**
 * @summary Create Service Work Order
 *
 * @param request CreateServiceWorkOrderRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateServiceWorkOrderResponse
 */
async function createServiceWorkOrderWithOptions(request: CreateServiceWorkOrderRequest, runtime: Util.RuntimeOptions): CreateServiceWorkOrderResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.creator)) {
    body['Creator'] = request.creator;
  }
  if (!Util.isUnset(request.customerId)) {
    body['CustomerId'] = request.customerId;
  }
  if (!Util.isUnset(request.durationDay)) {
    body['DurationDay'] = request.durationDay;
  }
  if (!Util.isUnset(request.isAttachment)) {
    body['IsAttachment'] = request.isAttachment;
  }
  if (!Util.isUnset(request.isMilestone)) {
    body['IsMilestone'] = request.isMilestone;
  }
  if (!Util.isUnset(request.isWorkOrderNotify)) {
    body['IsWorkOrderNotify'] = request.isWorkOrderNotify;
  }
  if (!Util.isUnset(request.notifyDay)) {
    body['NotifyDay'] = request.notifyDay;
  }
  if (!Util.isUnset(request.notifyId)) {
    body['NotifyId'] = request.notifyId;
  }
  if (!Util.isUnset(request.operateRemark)) {
    body['OperateRemark'] = request.operateRemark;
  }
  if (!Util.isUnset(request.operateType)) {
    body['OperateType'] = request.operateType;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.workOrderDetail)) {
    body['WorkOrderDetail'] = request.workOrderDetail;
  }
  if (!Util.isUnset(request.workOrderName)) {
    body['WorkOrderName'] = request.workOrderName;
  }
  if (!Util.isUnset(request.workOrderSource)) {
    body['WorkOrderSource'] = request.workOrderSource;
  }
  if (!Util.isUnset(request.workOrderStatus)) {
    body['WorkOrderStatus'] = request.workOrderStatus;
  }
  if (!Util.isUnset(request.workOrderType)) {
    body['WorkOrderType'] = request.workOrderType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateServiceWorkOrder',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Create Service Work Order
 *
 * @param request CreateServiceWorkOrderRequest
 * @return CreateServiceWorkOrderResponse
 */
async function createServiceWorkOrder(request: CreateServiceWorkOrderRequest): CreateServiceWorkOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return createServiceWorkOrderWithOptions(request, runtime);
}

model DeleteDjbhReportRequest {
  id?: long(name='Id', description='Primary key ID of the report.

This parameter is required.', example='26579'),
}

model DeleteDjbhReportResponseBody = {
  code?: string(name='Code', description='API response code.', example='successful'),
  httpStatusCode?: string(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt message for the returned result.', example='Successful!'),
  requestId?: string(name='RequestId', description='Request ID.', example='86786E4C-6416-55CF-9AB6-5E275B68801D'),
  success?: string(name='Success', description='Whether the call was successful. - **true**: The call was successful. - **false**: The call failed.', example='true'),
}

model DeleteDjbhReportResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDjbhReportResponseBody(name='body'),
}

/**
 * @summary Delete Security Assessment Report
 *
 * @param request DeleteDjbhReportRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDjbhReportResponse
 */
async function deleteDjbhReportWithOptions(request: DeleteDjbhReportRequest, runtime: Util.RuntimeOptions): DeleteDjbhReportResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDjbhReport',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Delete Security Assessment Report
 *
 * @param request DeleteDjbhReportRequest
 * @return DeleteDjbhReportResponse
 */
async function deleteDjbhReport(request: DeleteDjbhReportRequest): DeleteDjbhReportResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDjbhReportWithOptions(request, runtime);
}

model DescribeServiceLinkedRoleRequest {
  lang?: string(name='Lang', description='Language.', example='zh'),
  regionId?: string(name='RegionId', description='Region ID.', example='cn-hangzhou'),
}

model DescribeServiceLinkedRoleResponseBody = {
  entityRoleGrant?: boolean(name='EntityRoleGrant', description='Whether the service-linked role permission is granted:
- true: Granted.
- false: Not granted.', example='true'),
  requestId?: string(name='RequestId', description='Request ID.', example='02F8BBF3-2D61-5982-8911-EEB387BE3AF8'),
}

model DescribeServiceLinkedRoleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeServiceLinkedRoleResponseBody(name='body'),
}

/**
 * @summary Query Service-Linked Role
 *
 * @param request DescribeServiceLinkedRoleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeServiceLinkedRoleResponse
 */
async function describeServiceLinkedRoleWithOptions(request: DescribeServiceLinkedRoleRequest, runtime: Util.RuntimeOptions): DescribeServiceLinkedRoleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeServiceLinkedRole',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Query Service-Linked Role
 *
 * @param request DescribeServiceLinkedRoleRequest
 * @return DescribeServiceLinkedRoleResponse
 */
async function describeServiceLinkedRole(request: DescribeServiceLinkedRoleRequest): DescribeServiceLinkedRoleResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeServiceLinkedRoleWithOptions(request, runtime);
}

model DisposeServiceWorkOrderRequest {
  attachmentName?: string(name='AttachmentName', description='Attachment name.', example='bbaa133c-0ac2-489f-9fc8-39f91c2e770c_20230301-20240403-服务工单列表.xlsx'),
  endTime?: long(name='EndTime', description='End time.', example='2024-04-14 00:00:00'),
  forwardOwnerId?: string(name='ForwardOwnerId', description='Forward to owner.', example='405639'),
  id?: long(name='Id', description='Work order ID.

This parameter is required.', example='23172'),
  isAttachment?: string(name='IsAttachment', description='Attachment requirement.', example='Y'),
  isWorkOrderNotify?: string(name='IsWorkOrderNotify', description='Work order notification.', example='Y'),
  notifyId?: long(name='NotifyId', description='Notification ID.', example='10'),
  operateRemark?: string(name='OperateRemark', description='Operation remarks.

This parameter is required.', example='处理完成'),
  operateType?: string(name='OperateType', description='Processing type.

This parameter is required.', example='PROCESSED'),
  operator?: string(name='Operator', description='Operator.

This parameter is required.', example='396120'),
  startTime?: long(name='StartTime', description='Start time.', example='2024-04-02 00:00:00'),
  upgradeOwnerId?: string(name='UpgradeOwnerId', description='Upgrade owner.', example='336333'),
  workOrderDetail?: string(name='WorkOrderDetail', description='Work order details.', example='{"questionDetail":"测试工单","answerDetail":""}'),
  workOrderName?: string(name='WorkOrderName', description='Work order name.

This parameter is required.', example='安全产品配置问题与超量提醒'),
  workOrderStatus?: string(name='WorkOrderStatus', description='Work order status.', example='PROCESSED'),
}

model DisposeServiceWorkOrderResponseBody = {
  code?: string(name='Code', description='API response code.', example='200'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt message of the returned result.', example='successful'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='ED520610-6231-5D80-BADD-A8CDC7BBC809'),
  success?: boolean(name='Success', description='Whether the call was successful. - **true**: The call was successful. - **false**: The call failed.', example='true'),
}

model DisposeServiceWorkOrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DisposeServiceWorkOrderResponseBody(name='body'),
}

/**
 * @summary Process Service Work Order
 *
 * @param request DisposeServiceWorkOrderRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DisposeServiceWorkOrderResponse
 */
async function disposeServiceWorkOrderWithOptions(request: DisposeServiceWorkOrderRequest, runtime: Util.RuntimeOptions): DisposeServiceWorkOrderResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.attachmentName)) {
    body['AttachmentName'] = request.attachmentName;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.forwardOwnerId)) {
    body['ForwardOwnerId'] = request.forwardOwnerId;
  }
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.isAttachment)) {
    body['IsAttachment'] = request.isAttachment;
  }
  if (!Util.isUnset(request.isWorkOrderNotify)) {
    body['IsWorkOrderNotify'] = request.isWorkOrderNotify;
  }
  if (!Util.isUnset(request.notifyId)) {
    body['NotifyId'] = request.notifyId;
  }
  if (!Util.isUnset(request.operateRemark)) {
    body['OperateRemark'] = request.operateRemark;
  }
  if (!Util.isUnset(request.operateType)) {
    body['OperateType'] = request.operateType;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.upgradeOwnerId)) {
    body['UpgradeOwnerId'] = request.upgradeOwnerId;
  }
  if (!Util.isUnset(request.workOrderDetail)) {
    body['WorkOrderDetail'] = request.workOrderDetail;
  }
  if (!Util.isUnset(request.workOrderName)) {
    body['WorkOrderName'] = request.workOrderName;
  }
  if (!Util.isUnset(request.workOrderStatus)) {
    body['WorkOrderStatus'] = request.workOrderStatus;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DisposeServiceWorkOrder',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Process Service Work Order
 *
 * @param request DisposeServiceWorkOrderRequest
 * @return DisposeServiceWorkOrderResponse
 */
async function disposeServiceWorkOrder(request: DisposeServiceWorkOrderRequest): DisposeServiceWorkOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return disposeServiceWorkOrderWithOptions(request, runtime);
}

model DisposeWorkTaskRequest {
  operator?: string(name='Operator', description='Operator.

This parameter is required.', example='WB01089929'),
  optRemark?: string(name='OptRemark', description='Operation remarks.

This parameter is required.', example='处理完成'),
  status?: int32(name='Status', description='Work order status.

This parameter is required.', example='8'),
  taskIds?: string(name='TaskIds', description='Work order ID, multiple IDs separated by commas.

This parameter is required.', example='10310'),
}

model DisposeWorkTaskResponseBody = {
  code?: string(name='Code', description='Interface response code.', example='200'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt message of the returned result.', example='Success.'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='86786E4C-6416-55CF-9AB6-5E275B68801D'),
  success?: boolean(name='Success', description='Whether the call was successful. - **true**: The call was successful. - **false**: The call failed.', example='true'),
}

model DisposeWorkTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DisposeWorkTaskResponseBody(name='body'),
}

/**
 * @summary Handle Alert Work Order
 *
 * @param request DisposeWorkTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DisposeWorkTaskResponse
 */
async function disposeWorkTaskWithOptions(request: DisposeWorkTaskRequest, runtime: Util.RuntimeOptions): DisposeWorkTaskResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.optRemark)) {
    body['OptRemark'] = request.optRemark;
  }
  if (!Util.isUnset(request.status)) {
    body['Status'] = request.status;
  }
  if (!Util.isUnset(request.taskIds)) {
    body['TaskIds'] = request.taskIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DisposeWorkTask',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Handle Alert Work Order
 *
 * @param request DisposeWorkTaskRequest
 * @return DisposeWorkTaskResponse
 */
async function disposeWorkTask(request: DisposeWorkTaskRequest): DisposeWorkTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return disposeWorkTaskWithOptions(request, runtime);
}

model GetAlarmDetailByIdRequest {
  id?: long(name='Id', description='Primary key ID.

This parameter is required.', example='20077761'),
}

model GetAlarmDetailByIdResponseBody = {
  code?: string(name='Code', description='API response code.', example='200'),
  data?: {
    alarmEventType?: string(name='AlarmEventType', description='Alarm event type.', example='Unusual Logon'),
    alarmEventTypeDisplay?: string(name='AlarmEventTypeDisplay', description='Alarm event type.', example='Login with unusual location'),
    alarmId?: long(name='AlarmId', description='Alarm ID.', example='202427220'),
    alarmName?: string(name='AlarmName', description='Alarm name.', example='负载均衡可挂载服务器数量告警'),
    alarmSource?: string(name='AlarmSource', description='Alarm source.', example='SUSP_EVENT'),
    alarmTime?: string(name='AlarmTime', description='Latest alarm time.', example='2018-09-26 01:51:01'),
    analysisResult?: string(name='AnalysisResult', description='Analysis process.', example='[{"value":"服务器可能已被黑客攻击，存在恶意进程在运行。 分析过程：告警显示，服务端存在一个名为”dns.exe”的进程在访问”polling.burpcollaborator.net”，这是一个被黑名单列出的恶意域名。在正常情况下,”dns.exe”不应该单独存在于系统的路径下，并且也不应该访问这类恶意域名。因此，这个进程可能是黑客留下的恶意进程。","key":"结论"},{"value":"尽快对服务器进行全面扫描，清除恶意进程。同时，联系网络安全专家进行深入调查，以确定是否有其他潜在的安全威胁。","key":"处置建议"}]'),
    containHwMode?: boolean(name='ContainHwMode', description='Whether high-protection mode is enabled. true means enabled, false means not enabled.', example='false'),
    dealTime?: string(name='DealTime', description='Alarm handling time.', example='2018-09-26 01:51:01'),
    desc?: string(name='Desc', description='Description.', example='webshell'),
    eventDetails?: [ 
      {
        nameDisplay?: string(name='NameDisplay', description='Alarm event display name.', example='Login with unusual location'),
        type?: string(name='Type', description='Alarm event type.', example='text'),
        value?: string(name='Value', description='Path where the alarm event occurred.', example='/etc/crontab'),
        valueDisplay?: string(name='ValueDisplay', description='Path where the alarm event occurred.', example='/etc/crontab'),
      }
    ](name='EventDetails', description='Event details information.'),
    eventLevel?: string(name='EventLevel', description='Alarm level.', example='suspicious'),
    id?: long(name='Id', description='Primary key ID of the work order.', example='9772'),
    instanceName?: string(name='InstanceName', description='Affected asset.', example='nginx'),
    internetIp?: string(name='InternetIp', description='Public IP.', example='47.116.126.79'),
    intranetIp?: string(name='IntranetIp', description='Private IP.', example='172.19.195.176'),
    occurrenceTime?: string(name='OccurrenceTime', description='First occurrence time', example='2018-09-26 01:51:01'),
    ownerId?: string(name='OwnerId', description='Owner.', example='324546'),
    remark?: string(name='Remark', description='Disposal method.', example='192.168.XX.XX'),
    status?: string(name='Status', description='Handling status.', example='要查询的告警事件状态。取值：

0：全部
1：待处理
2：已忽略
4：已确认
8：已标记为误报
16：处理中
32：处理完毕
64：已经过期
128：已经删除
512：自动拦截中
513：自动拦截完毕'),
    tacticDisplayName?: string(name='TacticDisplayName', description='ATT&CK tactic name.', example='Malicious scripts-Malicious script code execution'),
  }(name='Data', description='Data returned by the interface.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Return message.', example='successful'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='5C1B0668-442C-57AE-9668-D894B0B012EB'),
  success?: boolean(name='Success', description='Whether the operation was successful: - true: Success. - false: Failure.', example='true'),
}

model GetAlarmDetailByIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAlarmDetailByIdResponseBody(name='body'),
}

/**
 * @summary Query Alarm Details
 *
 * @param request GetAlarmDetailByIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAlarmDetailByIdResponse
 */
async function getAlarmDetailByIdWithOptions(request: GetAlarmDetailByIdRequest, runtime: Util.RuntimeOptions): GetAlarmDetailByIdResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetAlarmDetailById',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Query Alarm Details
 *
 * @param request GetAlarmDetailByIdRequest
 * @return GetAlarmDetailByIdResponse
 */
async function getAlarmDetailById(request: GetAlarmDetailByIdRequest): GetAlarmDetailByIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAlarmDetailByIdWithOptions(request, runtime);
}

model GetAttackedAssetDealRequest {
  dateType?: string(name='DateType', description='Time filter type, supporting filtering by the last 7 days, the last 30 days, the last half year, or custom time periods.

This parameter is required.', example='month'),
  endDate?: long(name='EndDate', description='End time.

This parameter is required.', example='1732268720000'),
  startDate?: long(name='StartDate', description='Start time.

This parameter is required.', example='1732268720000'),
  suspEventSource?: string(name='SuspEventSource', description='Source of the alert event.', example='暂时无需传参，有问题请联系管理员'),
}

model GetAttackedAssetDealResponseBody = {
  code?: string(name='Code', description='Interface return code.', example='200'),
  data?: {
    ecsTrendList?: [ 
      {
        date?: string(name='Date', description='Date point.', example='202312或20231205'),
        dealCount?: long(name='DealCount', description='Number of processed items.', example='2'),
        findCount?: long(name='FindCount', description='Number of discovered items.', example='暂时无值，有疑问请联系管理员'),
      }
    ](name='EcsTrendList', description='Collection of attacked asset convergence trends.'),
  }(name='Data', description='Data query result.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Return message.', example='successful'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='1E74F11C-B4A8-5774-962C-02003BA8504E'),
  success?: boolean(name='Success', description='Whether the query was successful.<br />
**Enum values:**
* true: Success.
* false: Failure.', example='true'),
}

model GetAttackedAssetDealResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAttackedAssetDealResponseBody(name='body'),
}

/**
 * @summary Trend of Attacked Asset Convergence
 *
 * @param request GetAttackedAssetDealRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAttackedAssetDealResponse
 */
async function getAttackedAssetDealWithOptions(request: GetAttackedAssetDealRequest, runtime: Util.RuntimeOptions): GetAttackedAssetDealResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.dateType)) {
    body['DateType'] = request.dateType;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  if (!Util.isUnset(request.suspEventSource)) {
    body['SuspEventSource'] = request.suspEventSource;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetAttackedAssetDeal',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Trend of Attacked Asset Convergence
 *
 * @param request GetAttackedAssetDealRequest
 * @return GetAttackedAssetDealResponse
 */
async function getAttackedAssetDeal(request: GetAttackedAssetDealRequest): GetAttackedAssetDealResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAttackedAssetDealWithOptions(request, runtime);
}

model GetBaselineSummaryRequest {
  dateType?: string(name='DateType', description='Time filter type, supports filtering by the last 7 days, the last 30 days, the last half year, or custom time periods.

This parameter is required.', example='month'),
  endDate?: long(name='EndDate', description='End time.

This parameter is required.', example='1732156885986'),
  startDate?: long(name='StartDate', description='Start time.

This parameter is required.', example='1729478485000'),
  suspEventSource?: string(name='SuspEventSource', description='Alert event source.', example='该字段暂未使用，有问题请联系管理员'),
}

model GetBaselineSummaryResponseBody = {
  code?: string(name='Code', description='Interface response code.', example='200'),
  data?: {
    trendDTOList?: [ 
      {
        date?: string(name='Date', description='Date point.', example='202408或者20240801'),
        dealCount?: long(name='DealCount', description='Number of processed items.', example='10'),
        findCount?: long(name='FindCount', description='Number of discovered items.', example='12'),
      }
    ](name='TrendDTOList', description='Collection of baseline statistical data.'),
  }(name='Data', description='Data returned by the interface.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt message for the returned result.', example='successful'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='67D61738-5E38-5164-947A-34E3850D493A'),
  success?: boolean(name='Success', description='Indicates whether the operation was successful. Values: true: success; false: failure.', example='true'),
}

model GetBaselineSummaryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetBaselineSummaryResponseBody(name='body'),
}

/**
 * @summary Compliance Risk Convergence Trend
 *
 * @param request GetBaselineSummaryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetBaselineSummaryResponse
 */
async function getBaselineSummaryWithOptions(request: GetBaselineSummaryRequest, runtime: Util.RuntimeOptions): GetBaselineSummaryResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.dateType)) {
    body['DateType'] = request.dateType;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  if (!Util.isUnset(request.suspEventSource)) {
    body['SuspEventSource'] = request.suspEventSource;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetBaselineSummary',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Compliance Risk Convergence Trend
 *
 * @param request GetBaselineSummaryRequest
 * @return GetBaselineSummaryResponse
 */
async function getBaselineSummary(request: GetBaselineSummaryRequest): GetBaselineSummaryResponse {
  var runtime = new Util.RuntimeOptions{};
  return getBaselineSummaryWithOptions(request, runtime);
}

model GetConsoleScoreRequest {
  dateType?: string(name='DateType', description='Filter time type, supports filtering by the last 7 days, last 30 days, last half year, or custom. If empty, it represents the last 7 days.

This parameter is required.', example='month'),
  endDate?: long(name='EndDate', description='End date.

This parameter is required.', example='1732156885986'),
  startDate?: long(name='StartDate', description='Start date.

This parameter is required.', example='1729478485000'),
  suspEventSource?: string(name='SuspEventSource', description='Source of alert events.', example='该字段暂未使用，有问题请联系管理员'),
}

model GetConsoleScoreResponseBody = {
  code?: string(name='Code', description='Interface response code.', example='Success'),
  data?: any(name='Data', description='Data returned by the interface.', example='{
    "score": "94.00",
    "consoleScoreTrendDTOS": [
        {
            "date": "20241009",
            "score": "100.0"
        }
    ],
    "cyclicYearOverYear": "-6.00",
    "recordDate": "20241209",
    "weeklyYearOverYear": "1.62",
    "aboveWholeNetworkUserRatio": "6.25",
    "aliUid": "1601097845544644",
    "detailJson": "[{\\\\"detailDTO\\\\":[{\\\\"count\\\\":0,\\\\"itemName\\\\":\\\\"应用漏洞POC验证\\\\",\\\\"mark\\\\":\\\\"1\\\\"},{\\\\"count\\\\":0,\\\\"itemName\\\\":\\\\"未授权访问漏洞（公网暴露）\\\\",\\\\"mark\\\\":\\\\"1\\\\"},{\\\\"count\\\\":0,\\\\"itemName\\\\":\\\\"后台弱口令漏洞（公网暴露）\\\\",\\\\"mark\\\\":\\\\"1\\\\"},{\\\\"count\\\\":0,\\\\"itemName\\\\":\\\\"文件上传漏洞（公网暴露）\\\\",\\\\"mark\\\\":\\\\"1\\\\"}],\\\\"markRate\\\\":\\\\"0.5\\\\",\\\\"markType\\\\":\\\\"vul\\\\"},{\\\\"detailDTO\\\\":[{\\\\"count\\\\":12,\\\\"itemName\\\\":\\\\"WAF3.0回源配置不正确\\\\",\\\\"mark\\\\":\\\\"1\\\\"},{\\\\"count\\\\":0,\\\\"itemName\\\\":\\\\"AK泄露检查未开启\\\\",\\\\"mark\\\\":\\\\"1\\\\"},{\\\\"count\\\\":0,\\\\"itemName\\\\":\\\\"DNAT管理端口开放\\\\",\\\\"mark\\\\":\\\\"1\\\\"},{\\\\"count\\\\":0,\\\\"itemName\\\\":\\\\"高危端口暴露\\\\",\\\\"mark\\\\":\\\\"0.5\\\\"}],\\\\"markRate\\\\":\\\\"0.5\\\\",\\\\"markType\\\\":\\\\"risk\\\\"}]"
}'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt message for the result returned.', example='successful'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='D0937B0F-9180-5F70-B6ED-0BA22591627F'),
  success?: boolean(name='Success', description='Indicates whether the operation was successful. true means success, false means failure.', example='true'),
}

model GetConsoleScoreResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetConsoleScoreResponseBody(name='body'),
}

/**
 * @summary Get Console Score
 *
 * @param request GetConsoleScoreRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetConsoleScoreResponse
 */
async function getConsoleScoreWithOptions(request: GetConsoleScoreRequest, runtime: Util.RuntimeOptions): GetConsoleScoreResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.dateType)) {
    body['DateType'] = request.dateType;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  if (!Util.isUnset(request.suspEventSource)) {
    body['SuspEventSource'] = request.suspEventSource;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetConsoleScore',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Get Console Score
 *
 * @param request GetConsoleScoreRequest
 * @return GetConsoleScoreResponse
 */
async function getConsoleScore(request: GetConsoleScoreRequest): GetConsoleScoreResponse {
  var runtime = new Util.RuntimeOptions{};
  return getConsoleScoreWithOptions(request, runtime);
}

model GetDetailByIdRequest {
  id?: long(name='Id', description='Primary key ID.

This parameter is required.', example='22'),
}

model GetDetailByIdResponseBody = {
  code?: string(name='Code', description='Interface return code.', example='404'),
  data?: {
    vulDetails?: [ 
      {
        cveId?: string(name='CveId', description='CVE ID.', example='CVE-2022-21291'),
        cvssScore?: string(name='CvssScore', description='The CVSS score of the vulnerability in the Alibaba Cloud vulnerability database.', example='10.0'),
        fixSuggestion?: string(name='FixSuggestion', description='Fix suggestion.', example='https://avd.aliyun.com/detail/CVE-2022-21291'),
        title?: string(name='Title', description='Title of the vulnerability announcement.', example='Chanjet T-Plus SetupAccount/Upload. Aspx file upload vulnerability(CNVD-2022-60632)'),
      }
    ](name='VulDetails', description='Vulnerability details.'),
  }(name='Data', description='Data query result.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Return message.', example='success'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='DAB46EC5-3746-59C4-B6D2-469F442EC73F'),
  success?: boolean(name='Success', description='Indicates whether the call was successful. Values: - **true**: indicates a successful call. - **false**: indicates a failed call.', example='true'),
}

model GetDetailByIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDetailByIdResponseBody(name='body'),
}

/**
 * @summary Query Risk Details
 *
 * @param request GetDetailByIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDetailByIdResponse
 */
async function getDetailByIdWithOptions(request: GetDetailByIdRequest, runtime: Util.RuntimeOptions): GetDetailByIdResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDetailById',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Query Risk Details
 *
 * @param request GetDetailByIdRequest
 * @return GetDetailByIdResponse
 */
async function getDetailById(request: GetDetailByIdRequest): GetDetailByIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDetailByIdWithOptions(request, runtime);
}

model GetDocumentDownloadUrlRequest {
  id?: long(name='Id', description='Document management ID.

This parameter is required.', example='175815'),
  reportType?: string(name='ReportType', description='Report type.', example='5'),
}

model GetDocumentDownloadUrlResponseBody = {
  code?: string(name='Code', description='API status code.', example='200'),
  data?: string(name='Data', description='OSS file access URL.', example='https://oos-cn.ctyunapi.cn/example-bucket/test/1.jpg'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Message of the returned result.', example='successful'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='C7BE80B4-7692-54FA-AB22-2A7DF08C4754'),
  success?: boolean(name='Success', description='Whether the call was successful: - **true**: The call was successful. - **false**: The call failed.', example='true'),
}

model GetDocumentDownloadUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDocumentDownloadUrlResponseBody(name='body'),
}

/**
 * @summary Single Service Report Download
 *
 * @param request GetDocumentDownloadUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDocumentDownloadUrlResponse
 */
async function getDocumentDownloadUrlWithOptions(request: GetDocumentDownloadUrlRequest, runtime: Util.RuntimeOptions): GetDocumentDownloadUrlResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.reportType)) {
    body['ReportType'] = request.reportType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDocumentDownloadUrl',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Single Service Report Download
 *
 * @param request GetDocumentDownloadUrlRequest
 * @return GetDocumentDownloadUrlResponse
 */
async function getDocumentDownloadUrl(request: GetDocumentDownloadUrlRequest): GetDocumentDownloadUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDocumentDownloadUrlWithOptions(request, runtime);
}

model GetDocumentPageRequest {
  currentPage?: int32(name='CurrentPage', description='Current page.

This parameter is required.', example='1'),
  deliveredBy?: string(name='DeliveredBy', description='Delivered by.', example='luna'),
  documentName?: string(name='DocumentName', description='Document name.', example='month report'),
  documentType?: string(name='DocumentType', description='Document type.', example='0'),
  pageSize?: int32(name='PageSize', description='Page size.

This parameter is required.', example='20'),
  reportType?: string(name='ReportType', description='Report type.

This parameter is required.', example='1'),
}

model GetDocumentPageResponseBody = {
  code?: string(name='Code', description='API response code.', example='200'),
  data?: [ 
    {
      deliveredBy?: string(name='DeliveredBy', description='Delivered by.', example='luna'),
      documentName?: string(name='DocumentName', description='Report name.', example='month report'),
      documentType?: string(name='DocumentType', description='Service report type.', example='3'),
      id?: long(name='Id', description='Primary key ID of the document.', example='346409'),
      reportStatus?: string(name='ReportStatus', description='Report status.', example='uploaded'),
      uploadTime?: string(name='UploadTime', description='Report generation time.', example='2023-03-21 17:26:34'),
    }
  ](name='Data', description='Response data.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt message for the result.', example='successful'),
  pageInfo?: {
    currentPage?: int32(name='CurrentPage', description='The current page number in pagination queries.', example='1'),
    pageSize?: int32(name='PageSize', description='Number of items per page in the returned data.', example='10'),
    totalCount?: int32(name='TotalCount', description='Total number of queried items.', example='3149'),
  }(name='PageInfo', description='Pagination information.'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='04DAD7B4-E1DA-5C2C-8E5C-A1EDC880CF60'),
  success?: boolean(name='Success', description='Indicates whether the call was successful. - **true**: The call was successful. - **false**: The call failed.', example='true'),
}

model GetDocumentPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDocumentPageResponseBody(name='body'),
}

/**
 * @summary Service Report Query
 *
 * @param request GetDocumentPageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDocumentPageResponse
 */
async function getDocumentPageWithOptions(request: GetDocumentPageRequest, runtime: Util.RuntimeOptions): GetDocumentPageResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.currentPage)) {
    body['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.deliveredBy)) {
    body['DeliveredBy'] = request.deliveredBy;
  }
  if (!Util.isUnset(request.documentName)) {
    body['DocumentName'] = request.documentName;
  }
  if (!Util.isUnset(request.documentType)) {
    body['DocumentType'] = request.documentType;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.reportType)) {
    body['ReportType'] = request.reportType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDocumentPage',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Service Report Query
 *
 * @param request GetDocumentPageRequest
 * @return GetDocumentPageResponse
 */
async function getDocumentPage(request: GetDocumentPageRequest): GetDocumentPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDocumentPageWithOptions(request, runtime);
}

model GetDocumentSummaryRequest {
  reportType?: string(name='ReportType', description='Type of service report.', example='1'),
}

model GetDocumentSummaryResponseBody = {
  code?: string(name='Code', description='Interface return code.', example='200'),
  data?: {
    documentCount?: long(name='DocumentCount', description='Number of documents.', example='10'),
    frequency?: long(name='Frequency', description='Number of services or days.', example='10'),
  }(name='Data', description='Data query result.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt message for the returned result.', example='successful'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='7903F2DE-D9EE-5D16-8A08-E9223E54B281'),
  success?: boolean(name='Success', description='Whether the call was successful. Values:
- **true**: Yes.
- **false**: No.', example='True'),
}

model GetDocumentSummaryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDocumentSummaryResponseBody(name='body'),
}

/**
 * @summary Service Report Home Page Statistics Acquisition
 *
 * @param request GetDocumentSummaryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDocumentSummaryResponse
 */
async function getDocumentSummaryWithOptions(request: GetDocumentSummaryRequest, runtime: Util.RuntimeOptions): GetDocumentSummaryResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.reportType)) {
    body['ReportType'] = request.reportType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDocumentSummary',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Service Report Home Page Statistics Acquisition
 *
 * @param request GetDocumentSummaryRequest
 * @return GetDocumentSummaryResponse
 */
async function getDocumentSummary(request: GetDocumentSummaryRequest): GetDocumentSummaryResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDocumentSummaryWithOptions(request, runtime);
}

model GetRecentDocumentRequest {
  dateType?: string(name='DateType', description='Filter time type, supports filtering by the last 7 days, the last 30 days, the last half year, or custom time ranges.

This parameter is required.', example='该字段暂未使用，有问题请联系管理员'),
  endDate?: long(name='EndDate', description='End time.

This parameter is required.', example='该字段暂未使用，有问题请联系管理员'),
  startDate?: long(name='StartDate', description='Start time.

This parameter is required.', example='该字段暂未使用，有问题请联系管理员'),
  suspEventSource?: string(name='SuspEventSource', description='Alert event source.', example='该字段暂未使用，有问题请联系管理员'),
}

model GetRecentDocumentResponseBody = {
  code?: string(name='Code', description='Interface response code.', example='200'),
  data?: [ 
    {
      id?: long(name='Id', description='Primary key ID.', example='360491'),
      name?: string(name='Name', description='Document name', example='文档名称测试'),
      uploadTime?: string(name='UploadTime', description='Upload time.', example='2023-03-20 14:30:38'),
    }
  ](name='Data', description='Data returned by the interface.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Response message.', example='successful'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='4916FA8D-F294-518D-B373-8B59D63CAB19'),
  success?: boolean(name='Success', description='Whether the call was successful. - **true**: The call was successful. - **false**: The call failed.', example='true'),
}

model GetRecentDocumentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetRecentDocumentResponseBody(name='body'),
}

/**
 * @summary Get Recently Uploaded Service Reports
 *
 * @param request GetRecentDocumentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetRecentDocumentResponse
 */
async function getRecentDocumentWithOptions(request: GetRecentDocumentRequest, runtime: Util.RuntimeOptions): GetRecentDocumentResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.dateType)) {
    body['DateType'] = request.dateType;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  if (!Util.isUnset(request.suspEventSource)) {
    body['SuspEventSource'] = request.suspEventSource;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetRecentDocument',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Get Recently Uploaded Service Reports
 *
 * @param request GetRecentDocumentRequest
 * @return GetRecentDocumentResponse
 */
async function getRecentDocument(request: GetRecentDocumentRequest): GetRecentDocumentResponse {
  var runtime = new Util.RuntimeOptions{};
  return getRecentDocumentWithOptions(request, runtime);
}

model GetSafetyCoverRequest {
  dateType?: string(name='DateType', description='Filter time type, supports filtering by the last 7 days, the last 30 days, the last half year, or custom time periods.

This parameter is required.', example='month'),
  endDate?: long(name='EndDate', description='End time.

This parameter is required.', example='1732268720000'),
  startDate?: long(name='StartDate', description='Start time.

This parameter is required.', example='1732255620000'),
  suspEventSource?: string(name='SuspEventSource', description='Alert event source.', example='该接口不用传'),
}

model GetSafetyCoverResponseBody = {
  code?: string(name='Code', description='API return code.', example='404'),
  data?: {
    cfwProtection?: {
      noProtectionCount?: long(name='NoProtectionCount', description='Number of unprotected items.', example='5'),
      protectionCount?: long(name='ProtectionCount', description='Number of protected items.', example='5'),
      protectionGrowthRate?: string(name='ProtectionGrowthRate', description='Year-over-year protection rate.', example='35.00'),
      protectionRate?: string(name='ProtectionRate', description='Protection rate.', example='50.00'),
      totalCount?: long(name='TotalCount', description='Total quantity.', example='10'),
    }(name='CfwProtection', description='CFW protection coverage.'),
    ecsProtection?: {
      noProtectionCount?: long(name='NoProtectionCount', description='Number of unprotected items.', example='5'),
      protectionCount?: long(name='ProtectionCount', description='Number of protected items.', example='5'),
      protectionGrowthRate?: string(name='ProtectionGrowthRate', description='Year-over-year growth in protection rate.', example='35.00'),
      protectionRate?: string(name='ProtectionRate', description='Protection rate.', example='50.00'),
      totalCount?: long(name='TotalCount', description='Total number of items.', example='10'),
    }(name='EcsProtection', description='ECS protection coverage.'),
    wafProtection?: {
      noProtectionCount?: long(name='NoProtectionCount', description='Number of unprotected items.', example='5'),
      protectionCount?: long(name='ProtectionCount', description='Number of protected items.', example='5'),
      protectionGrowthRate?: string(name='ProtectionGrowthRate', description='Year-over-year growth in protection rate.', example='35.00'),
      protectionRate?: string(name='ProtectionRate', description='Protection rate.', example='50.00'),
      totalCount?: long(name='TotalCount', description='Total number of items.', example='10'),
    }(name='WafProtection', description='WAF protection coverage.'),
  }(name='Data', description='Data query result.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Message of the response result.', example='system error'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='564f8bb9-df3c-42a0-877a-b35d48f66603'),
  success?: boolean(name='Success', description='Whether the call was successful:
- **true**: Call succeeded.
- **false**: Call failed.', example='True'),
}

model GetSafetyCoverResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSafetyCoverResponseBody(name='body'),
}

/**
 * @summary Get Safety Coverage
 *
 * @param request GetSafetyCoverRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSafetyCoverResponse
 */
async function getSafetyCoverWithOptions(request: GetSafetyCoverRequest, runtime: Util.RuntimeOptions): GetSafetyCoverResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.dateType)) {
    body['DateType'] = request.dateType;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  if (!Util.isUnset(request.suspEventSource)) {
    body['SuspEventSource'] = request.suspEventSource;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetSafetyCover',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Get Safety Coverage
 *
 * @param request GetSafetyCoverRequest
 * @return GetSafetyCoverResponse
 */
async function getSafetyCover(request: GetSafetyCoverRequest): GetSafetyCoverResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSafetyCoverWithOptions(request, runtime);
}

model GetSowListRequest {
  dateType?: string(name='DateType', description='Filter time type, supports filtering by the last 7 days, the last 30 days, the last half year, or custom time ranges.

This parameter is required.', example='month'),
  endDate?: long(name='EndDate', description='End time.

This parameter is required.', example='1732156885986'),
  startDate?: long(name='StartDate', description='Start time.

This parameter is required.', example='1729478485000'),
  suspEventSource?: string(name='SuspEventSource', description='Alert event source.', example='该字段暂未使用，有问题请联系管理员'),
}

model GetSowListResponseBody = {
  code?: string(name='Code', description='Interface response code.', example='Success'),
  data?: [ 
    {
      completeTime?: string(name='CompleteTime', description='Completion time.', example='2024-03-28 16:19:35'),
      operateRemark?: string(name='OperateRemark', description='Operation remarks.', example='新建'),
      progress?: string(name='Progress', description='Progress.', example='IN_PREPARATION'),
      recordCount?: int32(name='RecordCount', description='Record count.', example='173'),
      startTime?: string(name='StartTime', description='Start time.', example='2023-03-24 16:51:26'),
      taskTypeName?: string(name='TaskTypeName', description='Task type.', example='安全风险评估'),
      workOrderName?: string(name='WorkOrderName', description='Work order name.', example='安全产品配置问题与超量提醒'),
    }
  ](name='Data', description='Data returned by the interface.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt information for the returned result.', example='successful'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='FA8883BC-CB18-5E28-A113-8249917CA05E'),
  success?: boolean(name='Success', description='Whether the call was successful. - **true**: The call was successful. - **false**: The call failed.', example='true'),
}

model GetSowListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSowListResponseBody(name='body'),
}

/**
 * @summary Get SOW List
 *
 * @param request GetSowListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSowListResponse
 */
async function getSowListWithOptions(request: GetSowListRequest, runtime: Util.RuntimeOptions): GetSowListResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.dateType)) {
    body['DateType'] = request.dateType;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  if (!Util.isUnset(request.suspEventSource)) {
    body['SuspEventSource'] = request.suspEventSource;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetSowList',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Get SOW List
 *
 * @param request GetSowListRequest
 * @return GetSowListResponse
 */
async function getSowList(request: GetSowListRequest): GetSowListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSowListWithOptions(request, runtime);
}

model GetSuspEventPageRequest {
  alarmEndTime?: long(name='AlarmEndTime', description='Alarm end time.', example='1732515522000'),
  alarmStartTime?: long(name='AlarmStartTime', description='Alarm start time.', example='1722515522000'),
  currentPage?: int32(name='CurrentPage', description='Current page number.

This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='Number of items per page.

This parameter is required.', example='10'),
  source?: string(name='Source', description='Alarm source.', example='SUSP_EVENT'),
  status?: int32(name='Status', description='Disposal status.', example='1'),
}

model GetSuspEventPageResponseBody = {
  code?: string(name='Code', description='API response code.', example='OK'),
  data?: [ 
    {
      alarmEventType?: string(name='AlarmEventType', description='Alarm event type.', example='精准防御'),
      alarmId?: long(name='AlarmId', description='Alarm ID.', example='5b1eeebe4f22daa2b177298234214fa3'),
      alarmName?: string(name='AlarmName', description='Alarm name.', example='Web服务漏洞利用'),
      alarmSource?: string(name='AlarmSource', description='Alarm source.', example='SUSP_EVENT'),
      alarmTime?: string(name='AlarmTime', description='Latest alarm time.', example='1722515522000'),
      analysisResult?: string(name='AnalysisResult', description='Analysis process.', example='[{"value":"服务器可能已被黑客攻击，存在恶意进程在运行。 分析过程：告警显示，服务端存在一个名为”dns.exe”的进程在访问”polling.burpcollaborator.net”，这是一个被黑名单列出的恶意域名。在正常情况下,”dns.exe”不应该单独存在于系统的路径下，并且也不应该访问这类恶意域名。因此，这个进程可能是黑客留下的恶意进程。","key":"结论"},{"value":"尽快对服务器进行全面扫描，清除恶意进程。同时，联系网络安全专家进行深入调查，以确定是否有其他潜在的安全威胁。","key":"处置建议"}]'),
      dealTime?: string(name='DealTime', description='Alarm handling time.', example='1732515522000'),
      eventLevel?: string(name='EventLevel', description='Alarm level.', example='suspicious'),
      id?: long(name='Id', description='Ticket primary key id.', example='9947'),
      instanceName?: string(name='InstanceName', description='Affected asset.', example='shells-azhou'),
      internetIp?: string(name='InternetIp', description='Public IP address.', example='47.99.188.31'),
      intranetIp?: string(name='IntranetIp', description='Private IP address.', example='172.16.109.130'),
      occurrenceTime?: string(name='OccurrenceTime', description='First occurrence time.', example='该字段暂未使用，有问题请联系管理员'),
      ownerId?: string(name='OwnerId', description='Owner ID.', example='张三'),
      remark?: string(name='Remark', description='Disposal method.', example='处理完成'),
      status?: string(name='Status', description='Handling status.', example='未处理'),
    }
  ](name='Data', description='Data returned by the interface.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt message of the returned result.', example='system error'),
  pageInfo?: {
    currentPage?: int32(name='CurrentPage', description='The current page number in pagination queries.', example='1'),
    pageSize?: int32(name='PageSize', description='The number of items displayed per page in the returned data.', example='10'),
    totalCount?: int32(name='TotalCount', description='Total number of query results.', example='100'),
  }(name='PageInfo', description='Pagination information.'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='AFA6F7B7-7C4B-58BB-B8FB-E0FFA4483561'),
  success?: boolean(name='Success', description='Whether the call was successful.
- **true**: The call was successful. - **false**: The call failed.', example='true'),
}

model GetSuspEventPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSuspEventPageResponseBody(name='body'),
}

/**
 * @summary Alarm Disposal Query
 *
 * @param request GetSuspEventPageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSuspEventPageResponse
 */
async function getSuspEventPageWithOptions(request: GetSuspEventPageRequest, runtime: Util.RuntimeOptions): GetSuspEventPageResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.alarmEndTime)) {
    body['AlarmEndTime'] = request.alarmEndTime;
  }
  if (!Util.isUnset(request.alarmStartTime)) {
    body['AlarmStartTime'] = request.alarmStartTime;
  }
  if (!Util.isUnset(request.currentPage)) {
    body['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.source)) {
    body['Source'] = request.source;
  }
  if (!Util.isUnset(request.status)) {
    body['Status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetSuspEventPage',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Alarm Disposal Query
 *
 * @param request GetSuspEventPageRequest
 * @return GetSuspEventPageResponse
 */
async function getSuspEventPage(request: GetSuspEventPageRequest): GetSuspEventPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSuspEventPageWithOptions(request, runtime);
}

model GetSuspEventSummaryRequest {
  dateType?: string(name='DateType', description='Filter time type. Supports filtering by the last 7 days, the last 30 days, the last half year, or custom time ranges.

This parameter is required.', example='month'),
  endDate?: long(name='EndDate', description='End time.

This parameter is required.', example='1732156885986'),
  startDate?: long(name='StartDate', description='Start time.

This parameter is required.', example='1729478485000'),
  suspEventSource?: string(name='SuspEventSource', description='Alert event source.', example='SUSP_EVENT'),
}

model GetSuspEventSummaryResponseBody = {
  code?: string(name='Code', description='API response code.', example='200'),
  data?: {
    networkAttackTrendDTO?: {
      trendList?: [ 
        {
          date?: string(name='Date', description='Date.', example='202409或20240901'),
          ddosCount?: long(name='DdosCount', description='DDoS count.', example='10'),
          eipCount?: long(name='EipCount', description='EIP count.', example='10'),
          wafCount?: long(name='WafCount', description='WAF count.', example='10'),
        }
      ](name='TrendList', description='Collection of trend nodes for each attack item.'),
    }(name='NetworkAttackTrendDTO', description='Network attack trend.'),
    suspEventDealSummaryDTO?: {
      completedCount?: long(name='CompletedCount', description='Completed.', example='20'),
      handingCount?: long(name='HandingCount', description='In progress.', example='5'),
      handingRate?: string(name='HandingRate', description='Alert handling rate.', example='90'),
      totalCount?: long(name='TotalCount', description='Total number of alerts.', example='35'),
      totalGrowthRate?: string(name='TotalGrowthRate', description='Year-over-year comparison of alerts.', example='10'),
      waitHandleCount?: long(name='WaitHandleCount', description='Number of unhandled alerts.', example='10'),
    }(name='SuspEventDealSummaryDTO', description='Overview of alert handling.'),
    suspEventTopDTO?: {
      suspEventList?: [ 
        {
          eventName?: string(name='EventName', description='Alert name.', example='主动外连风险 IP'),
          taskCount?: long(name='TaskCount', description='Count.', example='7'),
        }
      ](name='SuspEventList', description='Top 10 before handling alarms'),
    }(name='SuspEventTopDTO', description='Top 10 alerts before handling.'),
    suspEventTrendDTO?: {
      trendList?: [ 
        {
          date?: string(name='Date', description='Time point.', example='202405或者20240501'),
          dealCount?: long(name='DealCount', description='Number of handled alerts.', example='10'),
          findCount?: long(name='FindCount', description='Number of discovered alerts.', example='15'),
        }
      ](name='TrendList', description='Trend of alerts.'),
    }(name='SuspEventTrendDTO', description='Trend of alert responses.'),
  }(name='Data', description='Data returned by the interface.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt message for the returned result.', example='Successful!'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='9B2DAE9B-B901-5818-AFEF-E5637D938280'),
  success?: boolean(name='Success', description='Whether the call was successful.
- true: Call succeeded.
- false: Call failed.', example='true'),
}

model GetSuspEventSummaryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSuspEventSummaryResponseBody(name='body'),
}

/**
 * @summary Get Alert Statistics
 *
 * @param request GetSuspEventSummaryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSuspEventSummaryResponse
 */
async function getSuspEventSummaryWithOptions(request: GetSuspEventSummaryRequest, runtime: Util.RuntimeOptions): GetSuspEventSummaryResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.dateType)) {
    body['DateType'] = request.dateType;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  if (!Util.isUnset(request.suspEventSource)) {
    body['SuspEventSource'] = request.suspEventSource;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetSuspEventSummary',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Get Alert Statistics
 *
 * @param request GetSuspEventSummaryRequest
 * @return GetSuspEventSummaryResponse
 */
async function getSuspEventSummary(request: GetSuspEventSummaryRequest): GetSuspEventSummaryResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSuspEventSummaryWithOptions(request, runtime);
}

model GetSuspPageSummaryResponseBody = {
  code?: string(name='Code', description='Interface response code.', example='200'),
  data?: {
    completedCount?: long(name='CompletedCount', description='Number of completed items.', example='10'),
    handingCount?: long(name='HandingCount', description='Number of items being processed.', example='10'),
    highCount?: long(name='HighCount', description='Number of high-risk items.', example='10'),
    lowCount?: long(name='LowCount', description='Number of low-risk items.', example='10'),
    mediumCount?: long(name='MediumCount', description='Number of medium-risk items.', example='10'),
    totalCount?: long(name='TotalCount', description='Total number of items.', example='30'),
    waitHandleCount?: long(name='WaitHandleCount', description='Number of unhandled items.', example='10'),
  }(name='Data', description='Data returned by the interface.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt message for the result returned.', example='SUCCESS'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='EF801DD1-D934-51B3-92D4-776CE17B184F'),
  success?: boolean(name='Success', description='Indicates whether the call was successful.
- **true**: Call succeeded.
- **false**: Call failed.', example='true'),
}

model GetSuspPageSummaryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSuspPageSummaryResponseBody(name='body'),
}

/**
 * @summary Alarm Page Statistics
 *
 * @param request GetSuspPageSummaryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSuspPageSummaryResponse
 */
async function getSuspPageSummaryWithOptions(runtime: Util.RuntimeOptions): GetSuspPageSummaryResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'GetSuspPageSummary',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Alarm Page Statistics
 *
 * @return GetSuspPageSummaryResponse
 */
async function getSuspPageSummary(): GetSuspPageSummaryResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSuspPageSummaryWithOptions(runtime);
}

model GetUserStatusResponseBody = {
  code?: string(name='Code', description='Interface response code.', example='200'),
  data?: {
    customerType?: string(name='CustomerType', description='Customer type.', example='official'),
    endDate?: string(name='EndDate', description='End date.', example='2023-09-28 00:00:00'),
    instanceId?: string(name='InstanceId', description='Instance ID.', example='726cec3c-4887-4354-8c21-c0ad12e10fc2'),
    startDate?: string(name='StartDate', description='Start date.', example='2023-09-20 00:00:00'),
    status?: string(name='Status', description='Status.', example='FirstLogin'),
    version?: string(name='Version', description='Version.', example='mdrjichu'),
  }(name='Data', description='Data returned by the interface.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt message of the returned result.', example='SUCCESS'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='D8DBD769-613E-5E6B-A9FD-B622375B152D'),
  success?: boolean(name='Success', description='Indicates whether the call was successful. - **true**: The call was successful. - **false**: The call failed.', example='true'),
}

model GetUserStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetUserStatusResponseBody(name='body'),
}

/**
 * @summary Query User Activation Status
 *
 * @param request GetUserStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetUserStatusResponse
 */
async function getUserStatusWithOptions(runtime: Util.RuntimeOptions): GetUserStatusResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'GetUserStatus',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Query User Activation Status
 *
 * @return GetUserStatusResponse
 */
async function getUserStatus(): GetUserStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUserStatusWithOptions(runtime);
}

model GetVulItemPageRequest {
  aliasName?: string(name='AliasName', description='Vulnerability alias.', example='RHSA-2018:3665-Important: NetworkManager security update'),
  currentPage?: int32(name='CurrentPage', description='Current page number.

This parameter is required.', example='1'),
  dealed?: string(name='Dealed', description='Processing status. y: processed; n: unprocessed; h: processing.', example='n'),
  level?: string(name='Level', description='Risk level.', example='later'),
  name?: string(name='Name', description='Vulnerability name.', example='oval:com.redhat.rhsa:def:20183665'),
  pageSize?: int32(name='PageSize', description='Number of items to display per page in the returned data.

This parameter is required.', example='10'),
  scanType?: string(name='ScanType', description='Vulnerability type.', example='sca'),
}

model GetVulItemPageResponseBody = {
  code?: string(name='Code', description='API response code.', example='200'),
  data?: [ 
    {
      aliasName?: string(name='AliasName', description='Vulnerability alias.', example='RHSA-2024:4620: libndp 安全更新'),
      asapCount?: int32(name='AsapCount', description='Number of high-priority vulnerabilities to be fixed.', example='74'),
      customerId?: string(name='CustomerId', description='User ID.', example='1940494487193744'),
      cveUrlPrefix?: string(name='CveUrlPrefix', description='Prefix for the CVE remediation advice URL.', example='https://avd.aliyun.com/detail/'),
      dealed?: string(name='Dealed', description='Processing status.', example='y'),
      findTime?: string(name='FindTime', description='Timestamp of the last discovery of the vulnerability.', example='2023-04-23 14:47:34'),
      handledCount?: int32(name='HandledCount', description='Number of processed vulnerabilities.', example='20'),
      id?: long(name='Id', description='Primary key ID.', example='353845'),
      laterCount?: int32(name='LaterCount', description='Number of medium-priority vulnerabilities to be fixed.', example='10'),
      level?: string(name='Level', description='Risk level', example='later'),
      name?: string(name='Name', description='Vulnerability name.', example='oval:com.redhat.rhsa:def:20205002'),
      nntfCount?: int32(name='NntfCount', description='Number of low-priority vulnerabilities to be fixed.', example='8'),
      related?: string(name='Related', description='CVE number.', example='CVE-2019-20907'),
      relatedCveCount?: int32(name='RelatedCveCount', description='Number of related CVE numbers.', example='20'),
      scanType?: string(name='ScanType', description='Vulnerability type.', example='sca'),
      tags?: string(name='Tags', description='Tags.', example='Elevation of Privilege'),
      totalFixCount?: long(name='TotalFixCount', description='Total number of fixed vulnerabilities.', example='50'),
    }
  ](name='Data', description='Data returned by the interface.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt message for the returned result.', example='successful'),
  pageInfo?: {
    currentPage?: int32(name='CurrentPage', description='The current page number for pagination queries.', example='1'),
    pageSize?: int32(name='PageSize', description='Number of items to display per page in the returned data.', example='10'),
    totalCount?: int32(name='TotalCount', description='Total number of records in the query result.', example='163'),
  }(name='PageInfo', description='Pagination information.'),
  requestId?: string(name='RequestId', description='Request response.

This parameter is required.', example='02F8BBF3-2D61-5982-8911-EEB387BE3AF8'),
  success?: boolean(name='Success', description='Whether the call was successful.
true: Call succeeded. false: Call failed.', example='true'),
}

model GetVulItemPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetVulItemPageResponseBody(name='body'),
}

/**
 * @summary Risk Query
 *
 * @param request GetVulItemPageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetVulItemPageResponse
 */
async function getVulItemPageWithOptions(request: GetVulItemPageRequest, runtime: Util.RuntimeOptions): GetVulItemPageResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.aliasName)) {
    body['AliasName'] = request.aliasName;
  }
  if (!Util.isUnset(request.currentPage)) {
    body['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.dealed)) {
    body['Dealed'] = request.dealed;
  }
  if (!Util.isUnset(request.level)) {
    body['Level'] = request.level;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.scanType)) {
    body['ScanType'] = request.scanType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetVulItemPage',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Risk Query
 *
 * @param request GetVulItemPageRequest
 * @return GetVulItemPageResponse
 */
async function getVulItemPage(request: GetVulItemPageRequest): GetVulItemPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return getVulItemPageWithOptions(request, runtime);
}

model GetVulListByIdRequest {
  currentPage?: int32(name='CurrentPage', description='Current page', example='1'),
  dealed?: string(name='Dealed', description='Whether it has been processed; y: processed; n: not processed', example='n'),
  id?: long(name='Id', description='Primary key ID

This parameter is required.', example='4209205'),
  necessity?: string(name='Necessity', description='Risk level', example='asap,later,nntf'),
  pageSize?: int32(name='PageSize', description='Page size', example='10'),
  remark?: string(name='Remark', description='Asset information of the vulnerability to be queried, which can be set as asset name, public IP, or private IP.', example='production_nat_cn-hangzhou_zone_105'),
  uuids?: string(name='Uuids', description='UUID of the server with the vulnerability to be queried. Multiple UUIDs should be separated by a comma (,).', example='3615b908-995a-4edb-bc85-1981b4e94ba0,9c52cf9a-d8ba-4e31-ae06-500b879ee4e6,4b7de3cf-c4ac-42fc-8804-35070493dc29,f3c01525-0777-4c97-88d9-bec11afd4a6a,a80bd516-c4f3-4c27-a169-c8abfaf9e89e'),
}

model GetVulListByIdResponseBody = {
  code?: string(name='Code', description='API response code.', example='200'),
  data?: [ 
    {
      aliasName?: string(name='AliasName', description='Vulnerability Alias', example='Tomcat websocket 拒绝服务漏洞利用代码披露（CVE-2020-13935）'),
      effectMsgDTOS?: [ 
        {
          matchList?: string(name='MatchList', description='Hit', example='fastjson(jar) extendField.safemode equals false'),
          path?: string(name='Path', description='Path', example='/uat6/qry/enquiry/policy/yrtPolicyList'),
          softName?: string(name='SoftName', description='Software name', example='python-perf 3.10.0'),
        }
      ](name='EffectMsgDTOS', description='Impact description'),
      firstTs?: string(name='FirstTs', description='Timestamp of the first time the vulnerability was detected', example='1620404763000'),
      instanceName?: string(name='InstanceName', description='Instance name of the asset', example='凌星-CentOS'),
      internetIp?: string(name='InternetIp', description='Public IP of the asset', example='39.101.73.28'),
      intranetIp?: string(name='IntranetIp', description='Private IP of the asset', example='172.22.216.17'),
      lastTs?: string(name='LastTs', description='Timestamp of the last time the vulnerability was detected', example='1620404763000'),
      name?: string(name='Name', description='Vulnerability name', example='SCA:ACSV-2020-111301'),
      necessity?: string(name='Necessity', description='Necessity level of vulnerability repair', example='later,asap,nntf'),
      related?: string(name='Related', description='List of associated CVEs for the vulnerability, separated by commas (,) if there are multiple values.', example='CVE-2020-13935'),
      repairCmd?: string(name='RepairCmd', description='Repair command', example='*** update python-perf'),
      repairTs?: string(name='RepairTs', description='Timestamp of vulnerability repair', example='1541207563000'),
      status?: string(name='Status', description='Vulnerability status:
1: Not fixed
2: Fix failed
3: Rollback failed
4: Fixing
5: Rolling back
6: Verifying
7: Fixed successfully
8: Fixed successfully, pending reboot
9: Rolled back successfully
10: Ignored
11: Rolled back successfully, pending reboot
12: Vulnerability does not exist
20: Expired', example='1'),
      tag?: string(name='Tag', description='Vulnerability tag', example='Restart Required'),
      uuid?: string(name='Uuid', description='UUID of the asset instance.', example='hdm_5cf2eaf263c021b354877943f181956d'),
    }
  ](name='Data', description='Data returned by the interface.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt message for the returned result.', example='successful'),
  pageInfo?: {
    currentPage?: int32(name='CurrentPage', description='Current page number.', example='1'),
    pageSize?: int32(name='PageSize', description='Number of items per page in the returned data.', example='10'),
    totalCount?: int32(name='TotalCount', description='Total number of records in the query result.', example='100'),
  }(name='PageInfo', description='Pagination information.'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='D38B3D2F-67FD-57FF-87D1-C431D2C70F76'),
  success?: boolean(name='Success', description='Indicates whether the call was successful. Values: - **true**: Yes. - **false**: No.', example='true'),
}

model GetVulListByIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetVulListByIdResponseBody(name='body'),
}

/**
 * @summary Query processed details
 *
 * @param request GetVulListByIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetVulListByIdResponse
 */
async function getVulListByIdWithOptions(request: GetVulListByIdRequest, runtime: Util.RuntimeOptions): GetVulListByIdResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.currentPage)) {
    body['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.dealed)) {
    body['Dealed'] = request.dealed;
  }
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.necessity)) {
    body['Necessity'] = request.necessity;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.remark)) {
    body['Remark'] = request.remark;
  }
  if (!Util.isUnset(request.uuids)) {
    body['Uuids'] = request.uuids;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetVulListById',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Query processed details
 *
 * @param request GetVulListByIdRequest
 * @return GetVulListByIdResponse
 */
async function getVulListById(request: GetVulListByIdRequest): GetVulListByIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return getVulListByIdWithOptions(request, runtime);
}

model GetVulPageSummaryResponseBody = {
  code?: string(name='Code', description='Interface return code.', example='200'),
  data?: {
    completedCount?: long(name='CompletedCount', description='Number of completed items.', example='1990'),
    handingCount?: long(name='HandingCount', description='Number of items being handled.', example='6'),
    highCount?: long(name='HighCount', description='Number of high-risk items.', example='500'),
    lowCount?: long(name='LowCount', description='Number of low-risk items.', example='1000'),
    mediumCount?: long(name='MediumCount', description='Number of medium-risk items.', example='500'),
    totalCount?: long(name='TotalCount', description='Total number of items.', example='2000'),
    waitHandleCount?: long(name='WaitHandleCount', description='Number of unhandled items.', example='4'),
  }(name='Data', description='Data query result.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Return message.', example='operation success'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='A3A575C8-80F9-5F04-AA24-CCAC246884A3'),
  success?: boolean(name='Success', description='Whether the call was successful. - **true**: The call was successful. - **false**: The call failed.', example='true'),
}

model GetVulPageSummaryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetVulPageSummaryResponseBody(name='body'),
}

/**
 * @summary Risk Page Statistics
 *
 * @param request GetVulPageSummaryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetVulPageSummaryResponse
 */
async function getVulPageSummaryWithOptions(runtime: Util.RuntimeOptions): GetVulPageSummaryResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'GetVulPageSummary',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Risk Page Statistics
 *
 * @return GetVulPageSummaryResponse
 */
async function getVulPageSummary(): GetVulPageSummaryResponse {
  var runtime = new Util.RuntimeOptions{};
  return getVulPageSummaryWithOptions(runtime);
}

model GetVulSummaryRequest {
  dateType?: string(name='DateType', description='Filter time type. Supports filtering by the last 7 days, the last 30 days, the last half year, or a custom time range.

This parameter is required.', example='month'),
  endDate?: long(name='EndDate', description='End time.

This parameter is required.', example='1732156885986'),
  startDate?: long(name='StartDate', description='Start time.

This parameter is required.', example='1729478485000'),
  suspEventSource?: string(name='SuspEventSource', description='Alert event source.', example='该字段暂未使用，有问题请联系管理员'),
}

model GetVulSummaryResponseBody = {
  code?: string(name='Code', description='Interface response code.', example='OK'),
  data?: {
    completedCount?: long(name='CompletedCount', description='Number of completed items.', example='10'),
    dealRate?: string(name='DealRate', description='Risk convergence rate.', example='50'),
    trendList?: [ 
      {
        date?: string(name='Date', description='Time point.', example='202407或者20240701'),
        dealCount?: long(name='DealCount', description='Number of handled items.', example='10'),
        findCount?: long(name='FindCount', description='Number of discovered items.', example='15'),
      }
    ](name='TrendList', description='Collection of vulnerability trend nodes.'),
    waitHandleCount?: long(name='WaitHandleCount', description='Number of unhandled items.', example='5'),
  }(name='Data', description='Data returned by the interface.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt message for the response result.', example='system error'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='EF801DD1-D934-51B3-92D4-776CE17B184F'),
  success?: boolean(name='Success', description='Whether the call was successful. - **true**: The call was successful. - **false**: The call failed.', example='true'),
}

model GetVulSummaryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetVulSummaryResponseBody(name='body'),
}

/**
 * @summary Get Risk Statistics
 *
 * @param request GetVulSummaryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetVulSummaryResponse
 */
async function getVulSummaryWithOptions(request: GetVulSummaryRequest, runtime: Util.RuntimeOptions): GetVulSummaryResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.dateType)) {
    body['DateType'] = request.dateType;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  if (!Util.isUnset(request.suspEventSource)) {
    body['SuspEventSource'] = request.suspEventSource;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetVulSummary',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Get Risk Statistics
 *
 * @param request GetVulSummaryRequest
 * @return GetVulSummaryResponse
 */
async function getVulSummary(request: GetVulSummaryRequest): GetVulSummaryResponse {
  var runtime = new Util.RuntimeOptions{};
  return getVulSummaryWithOptions(request, runtime);
}

model GetWorkTaskSummaryRequest {
  dateType?: string(name='DateType', description='Filter time type, supports filtering by the last 7 days, the last 30 days, the last half year, or custom time periods.

This parameter is required.', example='month'),
  endDate?: long(name='EndDate', description='End time.

This parameter is required.', example='1732156885986'),
  startDate?: long(name='StartDate', description='Start time.

This parameter is required.', example='1729478485000'),
  suspEventSource?: string(name='SuspEventSource', description='Alert event source.', example='该字段暂时未用，有问题请联系管理员'),
}

model GetWorkTaskSummaryResponseBody = {
  code?: string(name='Code', description='Response code.', example='OK'),
  data?: {
    dealAverageDuration?: long(name='DealAverageDuration', description='Average response time (in minutes).', example='60'),
    dealAverageDurationGrowthRate?: string(name='DealAverageDurationGrowthRate', description='Year-over-year growth rate of average response time.', example='20'),
    dealWorkTaskCount?: long(name='DealWorkTaskCount', description='Number of work orders responded to.', example='100'),
    dealWorkTaskCountRate?: string(name='DealWorkTaskCountRate', description='Year-over-year growth rate of the number of work orders responded to.', example='20'),
    workTaskCount?: long(name='WorkTaskCount', description='Number of service responses.', example='10'),
    workTaskDealRate?: string(name='WorkTaskDealRate', description='Problem closure rate.', example='90'),
    workTaskDealRateGrowthRate?: string(name='WorkTaskDealRateGrowthRate', description='Year-over-year growth rate of problem closure rate.', example='20'),
    workTaskGrowthRate?: string(name='WorkTaskGrowthRate', description='Year-over-year growth rate of service responses.', example='20'),
  }(name='Data', description='Data returned by the interface.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Prompt message for the response result.', example='Successful!'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='EF801DD1-D934-51B3-92D4-776CE17B184F'),
  success?: boolean(name='Success', description='Whether the call was successful. - **true**: The call was successful. - **false**: The call failed.', example='true'),
}

model GetWorkTaskSummaryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWorkTaskSummaryResponseBody(name='body'),
}

/**
 * @summary Get the First Line Work Order Statistics
 *
 * @param request GetWorkTaskSummaryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWorkTaskSummaryResponse
 */
async function getWorkTaskSummaryWithOptions(request: GetWorkTaskSummaryRequest, runtime: Util.RuntimeOptions): GetWorkTaskSummaryResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.dateType)) {
    body['DateType'] = request.dateType;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  if (!Util.isUnset(request.suspEventSource)) {
    body['SuspEventSource'] = request.suspEventSource;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWorkTaskSummary',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Get the First Line Work Order Statistics
 *
 * @param request GetWorkTaskSummaryRequest
 * @return GetWorkTaskSummaryResponse
 */
async function getWorkTaskSummary(request: GetWorkTaskSummaryRequest): GetWorkTaskSummaryResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWorkTaskSummaryWithOptions(request, runtime);
}

model PageServiceCustomerRequest {
  authStatus?: int32(name='AuthStatus', description='Authorization status.', example='1'),
  cmAuthStatus?: int32(name='CmAuthStatus', description='Cloud Monitoring - Alert authorization status.', example='1'),
  currentPage?: int32(name='CurrentPage', description='The page number of the query result, default is 1.

This parameter is required.', example='1'),
  endTime?: long(name='EndTime', description='End time. The format is a Unix timestamp, which is the number of milliseconds since January 1, 1970.', example='1710641101123'),
  monitorAuthStatus?: int32(name='MonitorAuthStatus', description='Cloud Security - Alert authorization status.', example='1'),
  pageSize?: int32(name='PageSize', description='Number of records per page.

This parameter is required.', example='10'),
  startTime?: long(name='StartTime', description='Start time. The format is a Unix timestamp, which is the number of milliseconds since January 1, 1970.', example='1710641101000'),
}

model PageServiceCustomerResponseBody = {
  code?: string(name='Code', description='Interface return code.', example='System error or openapi error'),
  data?: [ 
    {
      aliuid?: string(name='Aliuid', description='Customer UID.', example='1667751131382856'),
      authStatus?: int32(name='AuthStatus', description='Authorization status.', example='1'),
      cmAuthStatus?: int32(name='CmAuthStatus', description='Cloud Monitoring - Alert authorization status.', example='0'),
      endTime?: long(name='EndTime', description='End time. The format is a Unix timestamp, which is the number of milliseconds since January 1, 1970.', example='1710123149222'),
      level?: string(name='Level', description='Customer level.', example='GC1'),
      monitorAuthStatus?: int32(name='MonitorAuthStatus', description='Cloud Security - Alert authorization status.', example='1'),
      name?: string(name='Name', description='Customer name.', example='中国工程院'),
      ownId?: string(name='OwnId', description='Owner name.', example='常温'),
      startTime?: long(name='StartTime', description='Start time. The format is a Unix timestamp, which is the number of milliseconds since January 1, 1970.', example='1710123149000'),
      userId?: string(name='UserId', description='Customer ID.', example='1667751131382856'),
      version?: string(name='Version', description='Version information.', example='企业版'),
    }
  ](name='Data', description='Data query results.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Return message. When the request is successful, it returns a success message; when the request fails, it returns the reason for the failure.', example='OK'),
  pageInfo?: {
    currentPage?: int32(name='CurrentPage', description='The current page number in pagination queries.', example='1'),
    pageSize?: int32(name='PageSize', description='Number of items per page.', example='10'),
    totalCount?: int32(name='TotalCount', description='Total number of query results.', example='100'),
  }(name='PageInfo', description='Pagination information.'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='808A307F-9513-5099-AAA5-98D4EF199140'),
  success?: boolean(name='Success', description='Request return status.
- true: Success.
- false: Failure.', example='true'),
}

model PageServiceCustomerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PageServiceCustomerResponseBody(name='body'),
}

/**
 * @summary Service Customer Information Query
 *
 * @param request PageServiceCustomerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PageServiceCustomerResponse
 */
async function pageServiceCustomerWithOptions(request: PageServiceCustomerRequest, runtime: Util.RuntimeOptions): PageServiceCustomerResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.authStatus)) {
    body['AuthStatus'] = request.authStatus;
  }
  if (!Util.isUnset(request.cmAuthStatus)) {
    body['CmAuthStatus'] = request.cmAuthStatus;
  }
  if (!Util.isUnset(request.currentPage)) {
    body['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.monitorAuthStatus)) {
    body['MonitorAuthStatus'] = request.monitorAuthStatus;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PageServiceCustomer',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Service Customer Information Query
 *
 * @param request PageServiceCustomerRequest
 * @return PageServiceCustomerResponse
 */
async function pageServiceCustomer(request: PageServiceCustomerRequest): PageServiceCustomerResponse {
  var runtime = new Util.RuntimeOptions{};
  return pageServiceCustomerWithOptions(request, runtime);
}

model SendCustomEventRequest {
  customerId?: string(name='CustomerId', description='User ID.

This parameter is required.', example='1214484929940219'),
  dataSource?: string(name='DataSource', description='Data source.', example='aegis_suspicious_event'),
  eventDescription?: string(name='EventDescription', description='Event details.', example='疑似病毒木马启动运行。'),
  eventDetails?: string(name='EventDetails', description='Alert event details.', example='[{"name":"提示","type":"text","value":"在您的系统上发现可疑进程启动行为，通常与病毒木马或入侵事件相关"},{"name":"ATT&CK攻击阶段","type":"text","value":"代码执行"},{"name":"恶意行为","type":"text","value":"可疑的漏洞利用代码执行"},{"name":"规则类型","type":"text","value":"进程启动"},{"name":"规则引擎","type":"text","value":"精准攻击识别引擎"},{"name":"处置动作","type":"text","value":"阻断行为"},{"name":"进程路径","type":"text","value":"/usr/bin/python3.9"},{"name":"命令行","type":"text","value":"python3 /root/poc/python/cve-2018-15473.py --username root --port 22"},{"name":"父进程路径","type":"text","value":"/bin/gunkit"},{"name":"父进程命令行","type":"text","value":"gunkit serve-grpc --addr unix:///data/gunkit-grpc.sock"},{"name":"进程ID","type":"text","value":"22714"},{"name":"父进程ID","type":"text","value":"2986"},{"name":"描述","type":"text","value":"主动防御检测到可疑进程启动行为，这类可疑进程通常存在于特殊的系统目录，或通过后缀伪装成文档/音频/图片等文件诱导用户运行，该异常行为已被成功拦截"},{"name":"处置建议","type":"text","value":"请您及时排查是否是正常的业务操作，如果您觉得此次拦截是非预期的，那您可以在主动防御 - 恶意行为防御页面中，关闭“可疑进程启动“规则集或者将受影响机器从管理主机中移除"},{"name":"父进程关系","type":"processChain","value":"1:::/usr/lib/systemd/systemd --switched-root --system --deserialize 22 &&& 2939:::/usr/local/bin/containerd-shim-runc-v2 -namespace moby -id 270f164903b47d4e219b410b8d11d9079a7ad1bac8133aea604598300d3b03d5 -address /run/containerd/containerd.sock &&& 2962:::/usr/bin/python3 /usr/bin/supervisord -n &&& 2986:::gunkit serve-grpc --addr unix:///data/gunkit-grpc.sock"}]'),
  eventMarkdown?: string(name='EventMarkdown'),
  eventName?: string(name='EventName', description='Event name.

This parameter is required.', example='客户端离线'),
  eventType?: string(name='EventType', description='Event type.

This parameter is required.', example='SUSP_CUSTOM_CFW'),
  findTime?: long(name='FindTime', description='Alert discovery time.

This parameter is required.', example='2023-04-23 14:47:34'),
  instanceId?: string(name='InstanceId', description='Instance ID.', example='i-uf60h3ns25bzq9eyf8ps'),
  instanceName?: string(name='InstanceName', description='Instance name.', example='猫吉-售卖-MDR扫描器集群1'),
  isSend?: string(name='IsSend', description='Whether to send.

This parameter is required.', example='0'),
  level?: string(name='Level', description='Event level.

This parameter is required.', example='serious'),
  occurrenceTime?: long(name='OccurrenceTime', description='The first occurrence time of the alert event.', example='1724956996000'),
  ownerId?: string(name='OwnerId'),
  product?: string(name='Product', description='Product name.', example='CloudSecCenter'),
  uniqueId?: string(name='UniqueId', description='Unique ID.

This parameter is required.', example='68888f02-98f2-492b-a2b2-5b13295755b7'),
  uuid?: string(name='Uuid', description='UUID.', example='93B6CDAB-7D2E-33D2-9EBA-25D561A2E95F'),
}

model SendCustomEventResponseBody = {
  code?: string(name='Code', description='Interface response code.', example='200'),
  data?: {
    customerId?: string(name='CustomerId', description='Service UID.', example='1601097845544644'),
    customerName?: string(name='CustomerName', description='Customer name.', example='天津瑞鹏昇科技发展有限公司'),
    eventId?: string(name='EventId', description='Alert ID.', example='c0dc71d1-8a1d-4043-9767-f6c420e34901-81bd'),
    eventType?: string(name='EventType', description='Alert type.', example='SUSP_CUSTOM_WAF'),
    id?: long(name='Id', description='Work order ID.', example='1914348'),
    ownerId?: string(name='OwnerId', description='Owner ID.', example='352675'),
    ownerName?: string(name='OwnerName', description='Owner name.', example='乐牙'),
    workTaskName?: string(name='WorkTaskName', description='Work order name.', example='22端口禁止任意IP访问'),
  }(name='Data', description='Interface return data.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  message?: string(name='Message', description='Return message. When the request is successful, it returns a success message; when the request fails, it returns the reason for the failure.', example='successful'),
  requestId?: string(name='RequestId', description='Request ID.

This parameter is required.', example='606EB377-155D-5AEB-AC4F-F013444A4C45'),
  success?: boolean(name='Success', description='Whether the call was successful.

- true: Call succeeded.

- false: Call failed.', example='true'),
}

model SendCustomEventResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SendCustomEventResponseBody(name='body'),
}

/**
 * @summary Send Custom Alert Event
 *
 * @param request SendCustomEventRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SendCustomEventResponse
 */
async function sendCustomEventWithOptions(request: SendCustomEventRequest, runtime: Util.RuntimeOptions): SendCustomEventResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.customerId)) {
    body['CustomerId'] = request.customerId;
  }
  if (!Util.isUnset(request.dataSource)) {
    body['DataSource'] = request.dataSource;
  }
  if (!Util.isUnset(request.eventDescription)) {
    body['EventDescription'] = request.eventDescription;
  }
  if (!Util.isUnset(request.eventDetails)) {
    body['EventDetails'] = request.eventDetails;
  }
  if (!Util.isUnset(request.eventMarkdown)) {
    body['EventMarkdown'] = request.eventMarkdown;
  }
  if (!Util.isUnset(request.eventName)) {
    body['EventName'] = request.eventName;
  }
  if (!Util.isUnset(request.eventType)) {
    body['EventType'] = request.eventType;
  }
  if (!Util.isUnset(request.findTime)) {
    body['FindTime'] = request.findTime;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.instanceName)) {
    body['InstanceName'] = request.instanceName;
  }
  if (!Util.isUnset(request.isSend)) {
    body['IsSend'] = request.isSend;
  }
  if (!Util.isUnset(request.level)) {
    body['Level'] = request.level;
  }
  if (!Util.isUnset(request.occurrenceTime)) {
    body['OccurrenceTime'] = request.occurrenceTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.product)) {
    body['Product'] = request.product;
  }
  if (!Util.isUnset(request.uniqueId)) {
    body['UniqueId'] = request.uniqueId;
  }
  if (!Util.isUnset(request.uuid)) {
    body['Uuid'] = request.uuid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SendCustomEvent',
    version = '2016-12-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Send Custom Alert Event
 *
 * @param request SendCustomEventRequest
 * @return SendCustomEventResponse
 */
async function sendCustomEvent(request: SendCustomEventRequest): SendCustomEventResponse {
  var runtime = new Util.RuntimeOptions{};
  return sendCustomEventWithOptions(request, runtime);
}

